3.2.72 \(\int \frac {a+b \log (c x^n)}{d+e \log (f x^m)} \, dx\) [172]

Optimal. Leaf size=130 \[ \frac {b n x}{e m}-\frac {b e^{-\frac {d}{e m}} n x \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac {e^{-\frac {d}{e m}} x \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m} \]

[Out]

b*n*x/e/m-b*n*x*Ei((d+e*ln(f*x^m))/e/m)*(d+e*ln(f*x^m))/e^2/exp(d/e/m)/m^2/((f*x^m)^(1/m))+x*Ei((d+e*ln(f*x^m)
)/e/m)*(a+b*ln(c*x^n))/e/exp(d/e/m)/m/((f*x^m)^(1/m))

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2337, 2209, 2408, 12, 15, 6617} \begin {gather*} \frac {x e^{-\frac {d}{e m}} \left (f x^m\right )^{-1/m} \left (a+b \log \left (c x^n\right )\right ) \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right )}{e m}-\frac {b n x e^{-\frac {d}{e m}} \left (f x^m\right )^{-1/m} \left (d+e \log \left (f x^m\right )\right ) \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right )}{e^2 m^2}+\frac {b n x}{e m} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(d + e*Log[f*x^m]),x]

[Out]

(b*n*x)/(e*m) - (b*n*x*ExpIntegralEi[(d + e*Log[f*x^m])/(e*m)]*(d + e*Log[f*x^m]))/(e^2*E^(d/(e*m))*m^2*(f*x^m
)^m^(-1)) + (x*ExpIntegralEi[(d + e*Log[f*x^m])/(e*m)]*(a + b*Log[c*x^n]))/(e*E^(d/(e*m))*m*(f*x^m)^m^(-1))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 15

Int[(u_.)*((a_.)*(x_)^(n_))^(m_), x_Symbol] :> Dist[a^IntPart[m]*((a*x^n)^FracPart[m]/x^(n*FracPart[m])), Int[
u*x^(m*n), x], x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[m]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2337

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2408

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.)), x_Symbol] :> With[{u =
IntHide[(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[SimplifyIntegrand[u/x, x], x],
 x]] /; FreeQ[{a, b, c, d, e, f, n, p, r}, x]

Rule 6617

Int[ExpIntegralEi[(a_.) + (b_.)*(x_)], x_Symbol] :> Simp[(a + b*x)*(ExpIntegralEi[a + b*x]/b), x] - Simp[E^(a
+ b*x)/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{d+e \log \left (f x^m\right )} \, dx &=\frac {e^{-\frac {d}{e m}} x \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m}-(b n) \int \frac {e^{-\frac {d}{e m}} \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right )}{e m} \, dx\\ &=\frac {e^{-\frac {d}{e m}} x \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m}-\frac {\left (b e^{-\frac {d}{e m}} n\right ) \int \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \, dx}{e m}\\ &=\frac {e^{-\frac {d}{e m}} x \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m}-\frac {\left (b e^{-\frac {d}{e m}} n x \left (f x^m\right )^{-1/m}\right ) \int \frac {\text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right )}{x} \, dx}{e m}\\ &=\frac {e^{-\frac {d}{e m}} x \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m}-\frac {\left (b e^{-\frac {d}{e m}} n x \left (f x^m\right )^{-1/m}\right ) \text {Subst}\left (\int \text {Ei}\left (\frac {d+e x}{e m}\right ) \, dx,x,\log \left (f x^m\right )\right )}{e m^2}\\ &=\frac {e^{-\frac {d}{e m}} x \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m}-\frac {\left (b e^{-\frac {d}{e m}} n x \left (f x^m\right )^{-1/m}\right ) \text {Subst}\left (\int \text {Ei}(x) \, dx,x,\frac {d}{e m}+\frac {\log \left (f x^m\right )}{m}\right )}{e m}\\ &=\frac {b n x}{e m}-\frac {b e^{-\frac {d}{e m}} n x \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d}{e m}+\frac {\log \left (f x^m\right )}{m}\right ) \left (\frac {d}{e m}+\frac {\log \left (f x^m\right )}{m}\right )}{e m}+\frac {e^{-\frac {d}{e m}} x \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a+b \log \left (c x^n\right )\right )}{e m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 86, normalized size = 0.66 \begin {gather*} \frac {x \left (b e m n+e^{-\frac {d}{e m}} \left (f x^m\right )^{-1/m} \text {Ei}\left (\frac {d+e \log \left (f x^m\right )}{e m}\right ) \left (a e m-b d n-b e n \log \left (f x^m\right )+b e m \log \left (c x^n\right )\right )\right )}{e^2 m^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(d + e*Log[f*x^m]),x]

[Out]

(x*(b*e*m*n + (ExpIntegralEi[(d + e*Log[f*x^m])/(e*m)]*(a*e*m - b*d*n - b*e*n*Log[f*x^m] + b*e*m*Log[c*x^n]))/
(E^(d/(e*m))*(f*x^m)^m^(-1))))/(e^2*m^2)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.41, size = 2329, normalized size = 17.92

method result size
risch \(\text {Expression too large to display}\) \(2329\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/(d+e*ln(f*x^m)),x,method=_RETURNVERBOSE)

[Out]

-1/2*(-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*b*Pi*csgn(I*x^n)*csgn(I*c
*x^n)^2-I*b*Pi*csgn(I*c*x^n)^3+2*b*ln(c)+2*a)/e/m*x*(x^m)^(-1/m)*f^(-1/m)*exp(-1/2*(-I*Pi*csgn(I*f)*csgn(I*x^m
)*csgn(I*f*x^m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*ln(x))+2*I*d)/e/m)*ln(x^m)+b*n/e^2/m^2*x*(x^m)^(-1/m)*f^(-1/m
)*exp(-1/2*(-I*Pi*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)*e+I*Pi*csgn(I*f)*csgn(I*f*x^m)^2*e+I*Pi*csgn(I*x^m)*csgn
(I*f*x^m)^2*e-I*Pi*csgn(I*f*x^m)^3*e+2*d)/e/m)*Ei(1,-ln(x)+1/2*I*(e*Pi*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)-e*P
i*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2+e*Pi*csgn(I*f*x^m)^3+2*I*e*ln(f)+2*I*e*(ln(x^m)-m
*ln(x))+2*I*d)/e/m)*d

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e*log(f*x^m)),x, algorithm="maxima")

[Out]

integrate((b*log(c*x^n) + a)/(e*log(f*x^m) + d), x)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 87, normalized size = 0.67 \begin {gather*} \frac {{\left (b m n x e^{\left (\frac {{\left (e \log \left (f\right ) + d\right )} e^{\left (-1\right )}}{m} + 1\right )} + {\left (b m e \log \left (c\right ) - b n e \log \left (f\right ) - b d n + a m e\right )} \operatorname {log\_integral}\left (x e^{\left (\frac {{\left (e \log \left (f\right ) + d\right )} e^{\left (-1\right )}}{m}\right )}\right )\right )} e^{\left (-\frac {{\left (e \log \left (f\right ) + d\right )} e^{\left (-1\right )}}{m} - 2\right )}}{m^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e*log(f*x^m)),x, algorithm="fricas")

[Out]

(b*m*n*x*e^((e*log(f) + d)*e^(-1)/m + 1) + (b*m*e*log(c) - b*n*e*log(f) - b*d*n + a*m*e)*log_integral(x*e^((e*
log(f) + d)*e^(-1)/m)))*e^(-(e*log(f) + d)*e^(-1)/m - 2)/m^2

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \log {\left (c x^{n} \right )}}{d + e \log {\left (f x^{m} \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/(d+e*ln(f*x**m)),x)

[Out]

Integral((a + b*log(c*x**n))/(d + e*log(f*x**m)), x)

________________________________________________________________________________________

Giac [A]
time = 3.66, size = 179, normalized size = 1.38 \begin {gather*} \frac {b n x e^{\left (-1\right )}}{m} - \frac {b d n {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{m} + \frac {\log \left (f\right )}{m} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{m} - 2\right )}}{f^{\left (\frac {1}{m}\right )} m^{2}} + \frac {b {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{m} + \frac {\log \left (f\right )}{m} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{m} - 1\right )} \log \left (c\right )}{f^{\left (\frac {1}{m}\right )} m} - \frac {b n {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{m} + \frac {\log \left (f\right )}{m} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{m} - 1\right )} \log \left (f\right )}{f^{\left (\frac {1}{m}\right )} m^{2}} + \frac {a {\rm Ei}\left (\frac {d e^{\left (-1\right )}}{m} + \frac {\log \left (f\right )}{m} + \log \left (x\right )\right ) e^{\left (-\frac {d e^{\left (-1\right )}}{m} - 1\right )}}{f^{\left (\frac {1}{m}\right )} m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(d+e*log(f*x^m)),x, algorithm="giac")

[Out]

b*n*x*e^(-1)/m - b*d*n*Ei(d*e^(-1)/m + log(f)/m + log(x))*e^(-d*e^(-1)/m - 2)/(f^(1/m)*m^2) + b*Ei(d*e^(-1)/m
+ log(f)/m + log(x))*e^(-d*e^(-1)/m - 1)*log(c)/(f^(1/m)*m) - b*n*Ei(d*e^(-1)/m + log(f)/m + log(x))*e^(-d*e^(
-1)/m - 1)*log(f)/(f^(1/m)*m^2) + a*Ei(d*e^(-1)/m + log(f)/m + log(x))*e^(-d*e^(-1)/m - 1)/(f^(1/m)*m)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{d+e\,\ln \left (f\,x^m\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))/(d + e*log(f*x^m)),x)

[Out]

int((a + b*log(c*x^n))/(d + e*log(f*x^m)), x)

________________________________________________________________________________________